<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="/static/commons.css" />
    <style>
        label{
            width: 80px;
            text-align: right;
            display: inline-block;
        }
    </style>
</head>
{#<body style="background-image: url(/static/test.jpg);">#}
<body>
{# 用于传文件，要加form-data #}
    <form action="/login/" method="post" enctype="multipart/form-data">
        {% csrf_token %}
        <p>
            <label for="username">用户名：</label>
            <input id="username" name="user" type="text" />
        </p>
        <p>
            <label for="password">密码：</label>
            <input id="password" name="pwd" type="password" />

            <span style="color: red;">{{ error_msg }}</span>
        </p>
        <p>
            <label for="basketball">打篮球</label>
            <input type="checkbox" name="hobbies" value="打篮球" id="basketball">
            <label for="girls">撩妹</label>
            <input type="checkbox" name="hobbies" value="撩妹" id="girls">
            <label for="game">打游戏</label>
            <input type="checkbox" name="hobbies" value="打游戏" id="game">
            <label for="other">其他</label>
            <input type="checkbox" name="hobbies" value="其他" id="other">
        </p>
        <p>
            <label for="city">城市</label>
            <select name="city" id="city" multiple>
                <option value="杭州">杭州</option>
                <option value="北京">北京</option>
                <option value="上海">上海</option>
            </select>
        </p>
        <p>
            <input type="file" name="my_file">
        </p>
        <input type="submit" value="提交" />
    </form>
    <script src="/static/jquery.min.js"></script>
</body>
</html>